<extend name="Public/base" />

<block name="body">
    <form action="{:U('Order/orderExport')}" onsubmit="return orderexport();" method="POST" onkeydown="if(event.keyCode==13)return false;">
        <!-- 标题栏 -->
        <div class="main-title">
            <h2>app建议</h2>
        </div>
        <!-- 数据列表 -->

        <div class="data-table table-striped">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>店铺名字</th>
                    <th>地址</th>
                    <th style="min-width: 50px;">建议详情</th>
                    <th style="min-width: 50px">提交时间</th>
                </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr  valign="top">
                            <th>{$vo.realName}</th>
                            <th>{$vo.phone}</th>
                            <th>{$vo.shopName}</th>
                            <th>{$vo.province}{$vo.city}{$vo.street}</th>
                            <td>{$vo.advice} </td>
                            <td>{$vo.createAt|time_format}</td>
                        </tr>
                    </volist>
                    <else/>
                    <td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
            </table>
        </div>
        <div class="page">
            {$_page}
        </div>
    </form>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript">
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');

            var query = $('.search-form').find('input').serialize();
            var queryselect = $('.search-form').find('select').serialize();

            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            queryselect = queryselect.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            queryselect = queryselect.replace(/^&/g, '');

            if (url.indexOf('?') > 0) {
                url += '&' + query;
                url += '&' + queryselect;
            } else {
                url += '?' + query;
                url += '?' + queryselect;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav('{:U('Order/index')}');

        $(function () {
            $('.time').datetimepicker({
                //format: 'yyyy-mm-dd hh:ii',
                format: 'yyyy-mm-dd hh:ii:ss',
                language: "zh-CN",
                minView: 2,
                autoclose: true
            });
        });
        function orderexport(){
            if(confirm("确定是否导出!")){
                return true;
            }
            return false;
        }
    </script>
</block>
